home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_222 / plplot / examples / example07.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  1KB  |  58 lines

  1. /* Displays the plotter symbols for PLSYM */
  2.  
  3. #include <stdio.h>
  4.  
  5. static int  base[17] = { 0, 200, 500, 600, 700, 800, 900,
  6.    2000,2100,2200,2300,2400,2500,2600,2700,2800,2900 };
  7.  
  8. main()
  9. {
  10.       char text[4];
  11.       int i, j, k, l;
  12.       float x, y;
  13.  
  14. /* Full sized page for display */
  15.  
  16.       plstar(1,1);
  17.       for (l=0; l<17; l++)  {
  18.         pladv(0);
  19.  
  20. /* Set up viewport and window */
  21.  
  22.         plvpor(0.1,1.0,0.1,0.9);
  23.         plwind(0.0,1.0,0.0,1.0);
  24.  
  25. /* Draw the grid using plbox */
  26.  
  27.         plbox("bcgt",0.1,0,"bcgt",0.1,0);
  28.  
  29. /* Write the digits below the frame */
  30.  
  31.         for (i=0; i<=9; i++)  {
  32.           sprintf(text,"%d",i);
  33.           plmtex("b",1.5,0.1*i+0.05,0.5,text);
  34.         }
  35.     
  36.         k=0;
  37.         for (i=0; i<=9; i++)  {
  38.  
  39. /* Write the digits to the left of the frame */
  40.  
  41.           sprintf(text,"%d",base[l]+10*i);
  42.           plmtex("lv",1.0,0.95-0.1*i,1.0,text);
  43.           for (j=0; j<=9; j++) {
  44.             x=0.1*j+0.05;
  45.             y=0.95-0.1*i;
  46.  
  47. /* Display the symbols */
  48.  
  49.             plsym(1,&x,&y,base[l]+k);
  50.             k=k+1;
  51.           }
  52.         }
  53.  
  54.         plmtex("t",1.5,0.5,0.5,"PLPLOT Example 7 - PLSYM symbols");
  55.       }
  56.       plend();
  57. }
  58.